<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <title>ECharts</title>
    <!-- 引入 echarts.js -->
    <script src="/static/echarts.min.js"></script>
</head>
<body>
    {% include 'nav.html' %}
    <!-- 为ECharts准备一个具备大小（宽高）的Dom -->
    <h1>饼图</h1>
    <div id="pie" style="width: 600px;height:400px;"></div>
    <h1>柱状图</h1>
    <div id="bar" style="width: 600px;height:400px;"></div>
    <h1>折现图</h1>
    <div id="line" style="width: 600px;height:400px;"></div>
    <script type="text/javascript">
        // 基于准备好的dom，初始化echarts实例
        var pieChart = echarts.init(document.getElementById('pie'));
        var barChart = echarts.init(document.getElementById('bar'));
        var lineChart = echarts.init(document.getElementById('line'));
        // 使用刚指定的配置项和数据显示图表。
        pieChart.setOption({{ pie_options | safe }});
        barChart.setOption({{ bar_options | safe }});
        lineChart.setOption({{ line_options | safe }});
    </script>
</body>
</html>
